import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

/* Layout */
import Layout from '@/layout'
import Test from '@/views/test/list'

import danganlbiao from "../views/dangan/danganlbiao.vue"


/**
 * Note: sub-menu only appear when route children.length >= 1
 * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
 *
 * hidden: true                   if set true, item will not show in the sidebar(default is false)
 * alwaysShow: true               if set true, will always show the root menu
 *                                if not set alwaysShow, when item has more than one children route,
 *                                it will becomes nested mode, otherwise not show the root menu
 * redirect: noRedirect           if set noRedirect will no redirect in the breadcrumb
 * name:'router-name'             the name is used by <keep-alive> (must set!!!)
 * meta : {
    roles: ['admin','editor']    control the page roles (you can set multiple roles)
    title: 'title'               the name show in sidebar and breadcrumb (recommend set)
    icon: 'svg-name'             the icon show in the sidebar
    noCache: true                if set true, the page will no be cached(default is false)
    affix: true                  if set true, the tag will affix in the tags-view
    breadcrumb: false            if set false, the item will hidden in breadcrumb(default is true)
    activeMenu: '/example/list'  if set path, the sidebar will highlight the path you set

    noTagView                     不在tagView上显示
    noNgBar                       不显示加载进度条
  }
 */


/* 公共路由，无需权限 */
export const constantRoutes = [
  {
    path: '/redirect',
    component: Layout,
    hidden: true,
    children: [
      {
        path: '/redirect/:path*',
        component: () => import('@/views/redirect/index')
      }
    ]
  },
  {
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  },
  {
    path: '/auth-redirect',
    component: () => import('@/views/login/auth-redirect'),
    hidden: true
  },
  {
    path: '/404',
    component: () => import('@/views/error-page/404'),
    hidden: true
  },
  {
    path: '/401',
    component: () => import('@/views/error-page/401'),
    hidden: true
  },
  {
    path: '/',
    component: Layout,
    redirect: '/home',
    children: [
      {
        path: 'home',
        component: () => import('@/views/home/index'),
        name: 'Home',
        meta: { title: '首页', icon: 'dashboard', affix: true }
      }
    ]
  },
  /*门户*/
  {
    path: '/portal',
    component: Layout,
    meta: { title: '门户', icon: 'table' },
    children: [
      {
        path: 'notice-list',
        component: () => import('@/views/portal/noticeList'),
        name: 'noticeList',
        meta: { title: '通知公告' }
      },
      {
        path: 'add-notice',
        component: () => import('@/views/portal/addNotice'),
        name: 'addNotice',
        meta: { title: '发布通知' },
        hidden: true
      },
      {
        path: 'edit-notice/:id',
        component: () => import('@/views/portal/editNotice'),
        name: 'editNotice',
        meta: { title: '编辑通知' },
        hidden: true
      },
      {
        path: 'notice-detail/:id',
        component: () => import('@/views/portal/NoticeDetail'),
        name: 'NoticeDetail',
        meta: { title: '公告信息',noCache:true },
        hidden:true
      },
      {
        path: 'to-home',
        redirect: '/home',
        meta: { title: '文化宣传' }
      },
      {
        path: 'wen-xuan-list',
        component: () => import('@/views/portal/WenXuan/WenXuanList'),
        name: 'WenXuanList',
        meta: { title: '文宣发布',noCache:true },
      },
      {
        path: 'wen-xuan-save/:id',
        component: () => import('@/views/portal/WenXuan/WenXuanSave'),
        name: 'WenXuanSave',
        meta: { title: '发布信息',noCache:true },
        hidden:true
      },
      {
        path: 'wen-xuan-detail/:id',
        component: () => import('@/views/portal/WenXuan/WenXuanDetail'),
        name: 'WenXuanDetail',
        meta: { title: '文化宣传详细',noCache:true },
        hidden:true
      },
      {
        path: 'homeAll',
        component: () => import('@/views/portal/WenXuan/homeAll'),
        name: 'homeAll',
        meta: { title: '文化宣传详细',noCache:true },
        hidden:true
      },
    ]
  },

  /*个人办公*/
  {
    path:'/personal-office',
    component:Layout,
    meta:{title:'个人办公',icon:'c3'},
    alwaysShow:true,
    children:[
      {
        path: 'dailylog',
        component:()=>import('@/views/PersonalOffice/dailylog/DailyLog2'),
        name:'Dailylog',
        meta:{title:'工作日志'}
      },
      {
        path: 'send-message',
        component:()=>import('@/views/PersonalOffice/SendMessage/SendMessage'),
        name:'SendMessage',
        meta:{title:'发送短信'}
      },
      {
        path: 'XinxiGli',
        component:()=>import('@/views/xinxi/xinxiGli'),
        name:'xinxiGli',
        meta:{title:'信息系统'}
      },
      {
        path: 'addresss-book',
        component:()=>import('@/views/PersonalOffice/addressBook/AddressBookIndex'),
        name:'AddressBookIndex',
        meta:{title:'通讯录'},
        // redirect:'/personal-office/addresss-book/ge-ren',
        children:[
          {
            path:'ge-ren',
            component:()=>import('@/components/Tongxuenlu/Tonexuensel'),
            name:'Tonexuensel',
            meta:{breadcrumb: false,noTagView:true,parent:'addresss-book'},
            hidden:true
          },
          {
            path:'gong-si/:id',
            component:()=>import('@/components/Tongxuenlu/Gsitongxuen'),
            name:'Gsitongxuen',
            meta:{breadcrumb: false,noTagView:true,parent:'addresss-book',noCache: true},
            hidden:true
          },
          {
            path: 'addresss-group-manager',
            component:()=>import('@/views/PersonalOffice/addressBook/GroupManager'),
            name:'GroupManager',
            meta:{breadcrumb: false,noTagView:true,parent:'addresss-book',noCache: true},
            hidden:true
          },
        ]
      },
      {
        path: 'shoucang',
        component:()=>import('@/views/shoucang/shoucang'),
        name:'shoucang',
        meta:{title:'收藏夹'}
      }
    ]
  },
  /*收文系统*/
  {
    path:'/receipt',
    component:Layout,
    meta:{title:'收文处理',icon: 'chart'},
    children:[
      {
        path:'receipt-register',
        component:()=>import('@/views/receipt/ReceiptRegister'),
        name:"ReceiptRegister",
        meta:{title:"登记收文",noCache: true}
      },
      {
        path:'receipt-handle',
        component:()=>import('@/views/receipt/ReceiptHandleList'),
        name:"ReceiptHandleList",
        meta:{title:"收文处理",noCache: true }
      },
      {
        path:'receipt-verify',
        component:()=>import('@/views/receipt/ReceiptVerifyList'),
        name:"ReceiptVerifyList",
        meta:{title:"收文审核",noCache: true}
      },
      {
        path:'receipt-detail/:id',
        component:()=>import('@/views/receipt/ReceiptVerifyDetail'),
        name:"ReceiptVerifyDetail",
        meta:{title:"收文审核详细",noCache: true},
        hidden:true
      },
      {
        path:'receipt-wait-handle',
        component:()=>import('@/views/receipt/ReceiptWaitHandleList'),
        name:"ReceiptWaitHandleList",
        meta:{title:"待办收文",noCache: true}
      },
      {
        path:'receipt-done-handle',
        component:()=>import('@/views/receipt/ReceiptDoneHandleList'),
        name:"ReceiptDoneHandleList",
        meta:{title:"已办收文",noCache: true}
      },
      {
        path:'receipt-wait-handle-detail/:id/:flag',
        component:()=>import('@/views/receipt/ReceiptHandleDetail'),
        name:"ReceiptHandleDetail-1",
        meta:{title:"待办收文详细",noCache: true},
        hidden:true
      },
      {
        path:'receipt-done-handle-detail/:id/:flag',
        component:()=>import('@/views/receipt/ReceiptHandleDetail'),
        name:"ReceiptHandleDetail-2",
        meta:{title:"已办收文详细",noCache: true},
        hidden:true
      },
      {
        path:'daiyue',
        component:()=>import('@/views/shouwen/daiyue'),
        name:"daiyue",
        meta:{title:"待阅收文",noCache: true},

      },

      {
        path:'yiyue',
        component:()=>import('@/views/shouwen/yiyue'),
        name:"yiyue",
        meta:{title:"已阅收文",noCache: true},

      },

      {
        path:'lioucheng',
        component:()=>import('@/views/shouwen/lioucheng'),
        name:"lioucheng",
        meta:{title:"流程监控",noCache: true},

      },

      {
        path:'daiguidangshouwen',
        component:()=>import('@/views/shouwen/daiguidangshouwen'),
        name:"daiguidangshouwen",
        meta:{title:"待归档收文",noCache: true},

      },

      {
        path:'guidangchaxuen',
        component:()=>import('@/views/shouwen/guidangchaxuen'),
        name:"guidangchaxuen",
        meta:{title:"归档查询",noCache: true},
      },
      {
        path:'liouchong',
        component:()=>import('@/views/shouwen/xiangqing/liouchong'),
        name:"liouchong",
        meta:{title:"流程监控详情",noCache: true},
        hidden:true
      }


    ]
  },
  /* 发文系统 */
  {
    path:'sendDoc',
    component:Layout,
    meta:{title:'发文系统',icon: 'chart'},
    alwaysShow:true,
    children:[
      {
        path:'web-office',
        component:()=>import('@/views/FaWen/office'),
        name:'WebOffice',
        meta:{title:'草拟发文',noCache:true},
      }
    ]
  },
  /*督办交办*/
  {
    path:'/letter',
    component:Layout,
    meta:{title:'交办督办',icon: 'chart'},
    children:[
      {
        path:'letter-save',
        component:()=>import('@/views/letter/LetterSave'),
        name:"LetterSave",
        meta:{title:'交办督办事项',noCache:true},
      },
      {
        path:'letter-wait-handle',
        component:()=>import('@/views/letter/LetterDaiBan'),
        name:"LetterDaiBan",
        meta:{title:'待办事项',noCache:true},
      },
      {
        path:'Letter-handle-detail/:id/:flag',
        component:()=>import('@/views/letter/LetterDetail'),
        name:"LetterDetail",
        meta:{title:'督察督办详情',noCache:true},
        hidden:true
      },
      {
        path:'letter-done-handle',
        component:()=>import('@/views/letter/LetterYiBan'),
        name:"LetterYiBan",
        meta:{title:'已办事项',noCache:true},
      },
      {
        path:'lioucheng',
        component:()=>import('@/views/letter/LetterMonitoring'),
        name:"LetterMonitoring",
        meta:{title:'流程监控',noCache:true},
      },
      {
        path:'tong-ji',
        component:()=>import('@/views/letter/LetterTongJi'),
        name:"LetterTongJi",
        meta:{title:'归档统计',noCache:true},
      }
    ]
  },
  /*工作交流*/
  {
    path:'/work-exchange',
    component:Layout,
    meta:{title:'工作交流',icon: 'chart'},
    children:[
      {
        path:'save',
        component:()=>import('@/views/workExchange/WorkExchangeSave'),
        name:"WorkExchangeSave",
        meta:{title:'发布信息',noCache:true},
        hidden:true
      },
      {
        path:'all',
        component:()=>import('@/views/workExchange/WorkExchangeAll'),
        name:"WorkExchangeAll",
        meta:{title:'全部共享',noCache:true},
      },
      {
        path:'geren',
        component:()=>import('@/views/workExchange/WorkExchangeGeRen'),
        name:"WorkExchangeGeRen",
        meta:{title:'个人信息',noCache:true},
      },
      {
        path:'siren',
        component:()=>import('@/views/workExchange/WorkExchangeSiRen'),
        name:"WorkExchangeSiRen",
        meta:{title:'私人信息',noCache:true},
      },
      {
        path:'keshi',
        component:()=>import('@/views/workExchange/WorkExchangeKeShi'),
        name:"WorkExchangeKeShi",
        meta:{title:'科室信息',noCache:true},
      },
      {
        path:'info-detail',
        component:()=>import('@/views/workExchange/WorkInfoDetail'),
        name:"WorkInfoDetail",
        meta:{title:'信息查看'},
      },
      // huizongChakan
      {
        path:'huizong',
        component:()=>import('@/views/huizongChakan/huizong'),
        name:"huizong",
        meta:{title:'汇总查看'},
      },
      // huizongUp
      {
        path:'huizongUp',
        component:()=>import('@/views/huizongChakan/huizongUp'),
        name:"huizongUp",
        meta:{title:'汇总修改'},
        hidden:true
      },

      {
        path:'xiangqing',
        component:()=>import('@/views/huizongChakan/xiangqing'),
        name:"xiangqing",
        meta:{title:'汇总详情'},
        hidden:true
      },
    ]
  },
  /*加班管理*/
  {
    path:'/work-jiaban',
    component:Layout,
    meta:{title:'加班管理',icon:'c2'},
    children:[
      {
        path:'save',
        component:()=>import('@/views/jiaBan/JiaBanSave'),
        name:"JiaBanSave",
        meta:{title:'加班申请',noCache:true},
        hidden:true
      },
      {
        path:'list',
        component:()=>import('@/views/jiaBan/JiaBanList'),
        name:"JiaBanList",
        meta:{title:'加班管理',noCache:true},
      },
      {
        path:'approval-list',
        component:()=>import('@/views/jiaBan/JiaBanApprovalList'),
        name:"JiaBanApprovalList",
        meta:{title:'加班审批',noCache:true},
      },
      {
        path:'JiaBanLcheng',
        component:()=>import('@/views/jiaBan/JiaBanMonitoring'),
        name:"JiaBanMonitoring",
        meta:{title:'流程监控',noCache:true},
      },
      {
        path:'tong-ji',
        component:()=>import('@/views/jiaBan/JiaBanTongJi'),
        name:"JiaBanTongJi",
        meta:{title:'汇总统计',noCache:true},
      },
      {
        path:'approval-detail/:id/:flag',
        component:()=>import('@/views/jiaBan/JiaBanApprovalDetail'),
        name:"JiaBanApprovalDetail",
        meta:{title:'审批详细',noCache:true},
        hidden:true
      }
    ]
  },
  /*请假管理*/
  {
    path:'/work-qingjia',
    component:Layout,
    meta:{title:'请假管理',icon: 'email'},
    children:[
      {
        path:'save',
        component:()=>import('@/views/qingJia/QingJiaSave'),
        name:"QingJiaSave",
        meta:{title:'请假申请',noCache:true},
        hidden:true
      },
      {
        path:'list',
        component:()=>import('@/views/qingJia/QingJiaList'),
        name:"QingJiaList",
        meta:{title:'请假管理',noCache:true},
      },
      {
        path:'approval-list',
        component:()=>import('@/views/qingJia/QingJiaApprovalList'),
        name:"QingJiaApprovalList",
        meta:{title:'请假审批',noCache:true},
      },
      {
        path:'QingJiaLcheng',
        component:()=>import('@/views/qingJia/QingJiaLcheng'),
        name:"QingJiaLcheng",
        meta:{title:'流程监控',noCache:true},
      },
      {
        path:'tong-ji',
        component:()=>import('@/views/qingJia/QingJiaTongJi'),
        name:"QingJiaTongJi",
        meta:{title:'汇总统计',noCache:true},
      },
      {
        path:'approval-detail/:id/:flag',
        component:()=>import('@/views/qingJia/QingJiaApprovalDetail'),
        name:"QingJiaApprovalDetail",
        meta:{title:'审批详细',noCache:true},
        hidden:true
      },
      {
        path:'Shenpilioucheng',
        component:()=>import('@/views/qingJia/Shenpilioucheng'),
        name:"Shenpilioucheng",
        meta:{title:'审批流程',noCache:true},
        hidden:true
      }
    ]
  },
  /*外出管理*/
  {
    path:'/work-waichu',
    component:Layout,
    meta:{title:'外出管理',icon: 'form'},
    children:[
      {
        path:'save',
        component:()=>import('@/views/waiChu/WaiChuSave'),
        name:"WaiChuSave",
        meta:{title:'外出申请',noCache:true},
        hidden:true
      },
      {
        path:'list',
        component:()=>import('@/views/waiChu/WaiChuList'),
        name:"WaiChuList",
        meta:{title:'外出管理',noCache:true},
      },

      {
        path:'approval-list',
        component:()=>import('@/views/waiChu/WaiChuApprovalList'),
        name:"WaiChuApprovalList",
        meta:{title:'外出审批',noCache:true},
      },
      // WaiChuLChong
      {
        path:'WaiChuLChong',
        component:()=>import('@/views/waiChu/WaiChuLChong'),
        name:"WaiChuLChong",
        meta:{title:'流程监控',noCache:true},
      },
      {
        path:'tong-ji',
        component:()=>import('@/views/waiChu/WaiChuTongJI'),
        name:"WaiChuTongJI",
        meta:{title:'汇总统计',noCache:true},
      },
      {
        path:'approval-detail/:id/:flag',
        component:()=>import('@/views/waiChu/WaiChuApprovalDetail'),
        name:"WaiChuApprovalDetail",
        meta:{title:'审批详细',noCache:true},
        hidden:true
      }
    ]
  },
  /*综合审批*/
  {
    path:'/zonghe',
    component:Layout,
    meta:{title:'综合审批',icon: 'excel'},
    children:[
      {
        path:'save',
        component:()=>import('@/views/zongHe/ZongHeSave'),
        name:"ZongHeSave",
        meta:{title:'事务申请',noCache:true},
        hidden:true
      },
      {
        path:'list',
        component:()=>import('@/views/zongHe/ZongHeList'),
        name:"ZongHeList",
        meta:{title:'事务管理',noCache:true},
      },
      {
        path:'approval-list',
        component:()=>import('@/views/zongHe/ZongHeApprovalList'),
        name:"ZongHeApprovalList",
        meta:{title:'事务审批',noCache:true},
      },
      {
        path:'monitoring',
        component:()=>import('@/views/zongHe/ZongHeMonitoring'),
        name:"ZongHeMonitoring",
        meta:{title:'流程监控',noCache:true},
      },
      {
        path:'tong-ji',
        component:()=>import('@/views/zongHe/ZongHeTongJi'),
        name:"ZongHeTongJi",
        meta:{title:'汇总统计',noCache:true},
      },
      {
        path:'approval-detail/:id/:flag',
        component:()=>import('@/views/zongHe/ZongHeApprovalDetail'),
        name:"ZongHeApprovalDetail",
        meta:{title:'审批详细',noCache:true},
        hidden:true
      }
    ]
  },
  // 报销审批
  {
    path:'/baoxiao',
    component:Layout,
    meta:{title:'报销审批',icon: 'tab'},
    children:[
      {
        path:'save',
        component:()=>import('@/views/baoXiao/BaoXiaoSave'),
        name:"BaoXiaoSave",
        meta:{title:'报销申请',noCache:true},
        hidden:true
      },
      {
        path:'list',
        component:()=>import('@/views/baoXiao/BaoXiaoList'),
        name:"BaoXiaoList",
        meta:{title:'报销管理',noCache:true},
      },
      {
        path:'approval-list',
        component:()=>import('@/views/baoXiao/BaoXiaoApprovalList'),
        name:"BaoXiaoApprovalList",
        meta:{title:'报销审批',noCache:true},
      },
      {
        path:'approval-detail/:id/:flag',
        component:()=>import('@/views/baoXiao/BaoXiaoApprovalDetail'),
        name:"BaoXiaoApprovalDetail",
        meta:{title:'审批详细',noCache:true},
        hidden:true
      },
      {
        path:'monitoring',
        component:()=>import('@/views/baoXiao/BaoXiaoMonitoring'),
        name:"BaoXiaoMonitoring",
        meta:{title:'流程监控',noCache:true},
      },
      {
        path:'tong-ji',
        component:()=>import('@/views/baoXiao/BaoXiaoTongJi'),
        name:"BaoXiaoTongJi",
        meta:{title:'汇总统计',noCache:true},
      }
    ]
  },
  // 资产购置
  {
    path:'/zichan',
    component:Layout,
    meta:{title:'资产购置',icon: 'tree-table'},
    children:[
      {
        path:'save',
        component:()=>import('@/views/ziChan/ZiChanSave'),
        name:"ZiChanSave",
        meta:{title:'购置申请',noCache:true},
        hidden:true
      },
      {
        path:'list',
        component:()=>import('@/views/ziChan/ZiChanList'),
        name:"ZiChanList",
        meta:{title:'申请管理',noCache:true},
      },
      {
        path:'approval-list',
        component:()=>import('@/views/ziChan/ZiChanApprovalList'),
        name:"ZiChanApprovalList",
        meta:{title:'申请审批',noCache:true},
      },
      {
        path:'approval-detail/:id/:flag',
        component:()=>import('@/views/ziChan/ZiChanApprovalDetail'),
        name:"ZiChanApprovalDetail",
        meta:{title:'审批详细',noCache:true},
        hidden:true
      },
      {
        path:'monitoring',
        component:()=>import('@/views/ziChan/ZiChanMonitoring'),
        name:"ZiChanMonitoring",
        meta:{title:'流程监控',noCache:true},
      },
      {
        path:'tong-ji',
        component:()=>import('@/views/ziChan/ZiChanTongJi'),
        name:"ZiChanTongJi",
        meta:{title:'汇总统计',noCache:true},
      },
      {
        path:'zichanmingxi',
        component:()=>import('@/views/zichanmingxi/zichanmingxi'),
        name:"zichanmingxi",
        meta:{title:'资产明细',noCache:true},
      },

      {
        path:'zichanadd',
        component:()=>import('@/views/zichanmingxi/zichanadd'),
        name:"zichanadd",
        meta:{title:'资产添加',noCache:true},
      }
    ]
  },

  // 档案管理
  {
    path:'/danganlbiao',
    component:Layout,
    meta:{title:'档案管理',icon: 'tree'},
    children:[
      {
        path:'save',
        component:()=>import('@/views/dangan/danganlbiao'),
        name:"danganlbiao1",
        meta:{title:'档案管理',noCache:true},
        hidden:true
      },
      {
        path:'list',
        component:()=>import('@/views/dangan/danganlbiao'),
        name:"danganlbiao2",
        meta:{title:'档案列表',noCache:true},
      },
    ]
  },

  // 人事档案
  {
    path:'/renshidangan',
    component:Layout,
    meta:{title:'人事档案',icon: 'tree'},
    children:[
      {
        path:'save',
        component:()=>import('@/views/renshidangan/renshidangan'),
        name:"renshidangan1",
        meta:{title:'人事档案',noCache:true},
        hidden:true
      },

      {
        path:'renlist',
        component:()=>import('@/views/renshidangan/renshidangan'),
        name:"renshidangan2",
        meta:{title:'人事档案列表',noCache:true},
      },
      {
        path:'renshiadds',
        component:()=>import('@/views/renshidangan/renshiAdd/renshiadds'),
        name:"renshiadds",
        meta:{title:'添加档案',noCache:true},
      },

    ]
  },

  // 规章制度
  {
    path:'/gui-zhang-zhi-du',
    component:Layout,
    meta:{title:'规章制度',icon: 'table'},
    alwaysShow: true,
    children:[
      {
        path:'list',
        name:'GuiZhangZhiDuList',
        component:()=>import('@/views/guiZhangZhiDu/GuiZhangZhiDuList'),
        meta:{title:'规章制度管理',noCache:true}
      },
      {
        path:'save',
        name:'SaveGuiZhang',
        component:()=>import('@/views/guiZhangZhiDu/SaveGuiZhang'),
        meta:{title:'规章制度添加',noCache:true},
        hidden:true
      },
      {
        path:'edit/:id',
        name:'EditGuiZhang',
        component:()=>import('@/views/guiZhangZhiDu/EditGuiZhang'),
        meta:{title:'规章制度修改',noCache:true},
        hidden:true
      }
    ]
  },

  // 项目信息
  {
    path:'/project-info',
    component:Layout,
    meta:{title:'项目信息',icon: 'table'},
    children:[
      {
        path:'list',
        name:'ProjectInfoManager',
        component:()=>import('@/views/projectInfo/ProjectInfoManager'),
        meta:{title:'项目管理',noCache:true}
      },
      {
        path:'project-detail/:id',
        name:'ProjectDetail',
        component:()=>import('@/views/projectInfo/ProjectDetail'),
        meta:{title:'项目详情',noCache:true},
        hidden:true,
        children:[
          {
            path:'basic-info/:proId',
            name:'BasicInfo',
            component:()=>import('@/views/projectInfo/projectDetail/BasicInfo'),
            meta:{breadcrumb: false,noTagView:true,parent:'project-detail'},
            hidden:true
          },
          {
            path:'jin-du/:proId',
            name:'JinDuJiHua',
            component:()=>import('@/views/projectInfo/projectDetail/JinDuJiHua'),
            meta:{breadcrumb: false,noTagView:true,parent:'project-detail'},
            hidden:true
          },
          {
            path:'zhao-biao/:proId',
            name:'ZhaoBiao',
            component:()=>import('@/views/projectInfo/projectDetail/ZhaoBiao'),
            meta:{breadcrumb: false,noTagView:true,parent:'project-detail'},
            hidden:true
          },
          {
            path:'he-tong/:proId',
            name:'HeTong',
            component:()=>import('@/views/projectInfo/projectDetail/HeTong'),
            meta:{breadcrumb: false,noTagView:true,parent:'project-detail'},
            hidden:true
          },
          {
            path:'bian-geng/:proId',
            name:'BianGeng',
            component:()=>import('@/views/projectInfo/projectDetail/BianGeng'),
            meta:{breadcrumb: false,noTagView:true,parent:'project-detail'},
            hidden:true
          },
          {
            path:'yue-bao/:proId',
            name:'YueBao',
            component:()=>import('@/views/projectInfo/projectDetail/YueBao'),
            meta:{breadcrumb: false,noTagView:true,parent:'project-detail'},
            hidden:true
          },
          {
            path:'zao-jia/:proId',
            name:'ZaoJia',
            component:()=>import('@/views/projectInfo/projectDetail/ZaoJia'),
            meta:{breadcrumb: false,noTagView:true,parent:'project-detail'},
            hidden:true
          },
          {
            path:'zhi-liang/:proId',
            name:'ZhiLiang',
            component:()=>import('@/views/projectInfo/projectDetail/ZhiLiang'),
            meta:{breadcrumb: false,noTagView:true,parent:'project-detail'},
            hidden:true
          },
          {
            path:'yan-shou/:proId',
            name:'YanShou',
            component:()=>import('@/views/projectInfo/projectDetail/YanShou'),
            meta:{breadcrumb: false,noTagView:true,parent:'project-detail'},
            hidden:true
          },
          {
            path:'zi-liao/:proId',
            name:'ZiLiao',
            component:()=>import('@/views/projectInfo/projectDetail/ZiLiao'),
            meta:{breadcrumb: false,noTagView:true,parent:'project-detail'},
            hidden:true
          },
          {
            path:'kao-qin/:proId',
            name:'KaoQin',
            component:()=>import('@/views/projectInfo/projectDetail/KaoQin'),
            meta:{breadcrumb: false,noTagView:true,parent:'project-detail'},
            hidden:true
          },
          {
            path:'jian-kong/:proId',
            name:'JianKong',
            component:()=>import('@/views/projectInfo/projectDetail/JianKong'),
            meta:{breadcrumb: false,noTagView:true,parent:'project-detail'},
            hidden:true
          },
          {
            path:'huan-bao/:proId',
            name:'HuanBao',
            component:()=>import('@/views/projectInfo/projectDetail/HuanBao'),
            meta:{breadcrumb: false,noTagView:true,parent:'project-detail'},
            hidden:true
          }

        ]
      },

      {
        path:'my-project',
        name:'MyProject',
        component:()=>import('@/views/projectInfo/MyProject'),
        meta:{title:'我的项目',noCache:true}
      },
    ]
  },
  /*系统设置*/
  {
    path: '/system',
    component: Layout,
    meta: { title: '系统设置', icon: 'c1' },
    children: [
      {
        path:'user-permission',
        component: () => import('@/views/system/UserPermission'),
        name:'UserPermission',
        meta: { title: '用户权限设置',noCache:true },
        children:[
          {
            path: 'department-list',
            component: () => import('@/views/system/department/departmentList'),
            name: 'departmentList',
            meta:{breadcrumb: false,noTagView:true,parent:'user-permission'},
            hidden:true
          },
          {
            path: 'user-list',
            component: () => import('@/views/system/user/userList'),
            name: 'userList',
            meta:{breadcrumb: false,noTagView:true,parent:'user-permission'},
            hidden:true
          },
          {
            path: 'position-list',
            component: () => import('@/views/system/position/positionList'),
            name: 'positionList',
            meta:{breadcrumb: false,noTagView:true,parent:'user-permission'},
            hidden:true
          },
          {
            path: 'role-list',
            component: () => import('@/views/system/role/RoleList'),
            name: 'RoleList',
            meta:{breadcrumb: false,noTagView:true,parent:'user-permission'},
            hidden:true,
            children:[
              {
                path:'save',
                component: () => import('@/views/system/role/RoleList'),
                name: 'RoleList',
              }
            ]
          },
        ]
      },

      {
        path: 'oa-template-list',
        component: () => import('@/views/oaTemplate/OaTemplateList'),
        name: 'OaTemplateList',
        meta: { title: '模板管理' }
      }
    ]
  },
  // 菜单管理
  {
    path:'/menu',
    component:Layout,
    meta:{title:'菜单管理',icon: 'tree'},
    alwaysShow:true,
    children:[
      {
        path:'list',
        component:()=>import('@/views/menu/MenuList'),
        name:"MenuList",
        meta:{title:'菜单列表',noCache:true},
      },
      {
        path:'save',
        component:()=>import('@/views/menu/MenuSave'),
        name:"MenuSave",
        meta:{title:'编辑菜单',noCache:true},
        hidden:true
      }
    ]
  }

]

/**
 * 权限限制路由
 * path:'*' 404一定要写在这里
 * @type {Array}
 */
export const asyncRoutes = [
  {
    path: '/testList',
    component: Layout,
    redirect: '/testList/list',
    meta: { title: '测试', icon: 'table' },
    alwaysShow: true,
    children: [
      {
        path: 'list',
        component: ()=>import('@/views/test/list'),
        name: 'list',
        meta: { title: '请假测试页', icon: 'table' },
      }
    ]
  },
  {
    path:'*',
    redirect:'/404',
    hidden:true
  }
]

/* 初始只挂载公共路由 */
const createRouter = () => new Router({
  // mode: 'history', // require service support
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRoutes
})

const router = createRouter()

// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() {
  const newRouter = createRouter()
  router.matcher = newRouter.matcher // reset router
}

export default router
